<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$Think.lang.logintitletype}{$Think.lang.logintitle}</title>
    <link rel="stylesheet" href="__ADMIN__/vendor/layui/css/layui.css">
    <link rel="stylesheet" href="__ADMIN__/custom/css/login.css">
</head>
<body>
<div class="layui-anim layui-anim-up login-main" id="form-main">
    <form class="layui-form" action="?" method="post">
        <h3><span>{$Think.lang.logintitletype}</span>{$Think.lang.logintitle}</h3>
        <div class="ly-input">
            <input type="text" name="account" required  lay-verify="required" placeholder="{$Think.lang.inputaccount}" autocomplete="off" class="layui-input">
        </div>
        <div class="ly-input">
            <input type="password" name="password" required  lay-verify="required" placeholder="{$Think.lang.inputpassword}" autocomplete="off" class="layui-input">
        </div>
        <div class="ly-input" style="position: relative;">
            <input type="text" name="code" required  lay-verify="required" placeholder="{$Think.lang.inputcode}" autocomplete="off" class="layui-input" style="width: 100px;">
            <img src="{:captcha_src()}" alt="captcha" onclick="this.src='{:captcha_src()}?'+Math.random();" style="position: absolute;left:110px;top:0;height: 35px;cursor:pointer;"/>
        </div>
        <div class="ly-input">
            <button class="layui-btn layui-btn-danger ly-submit" id="ly-submit" lay-submit lay-filter="formDemo">{$Think.lang.loginbtn}</button>
        </div>
    </form>
    <p>{$Think.lang.copyright}</p>
</div>

<script src="__ADMIN__/vendor/js/jquery.js"></script>
<script src="__ADMIN__/vendor/layui/layui.js"></script>
<script src="__ADMIN__/custom/js/login.js"></script>
<script>
    //一般直接写在一个js文件中
    layui.use(['layer', 'form'], function(){
        var layer = layui.layer
            ,form = layui.form;
        form.on('submit(formDemo)', function(data){
            $('#ly-submit').submit();
        });
    });
</script>
</body>
</html>